package com.example.cxf.service;


import com.example.cxf.annotation.RestService;
import lombok.extern.slf4j.Slf4j;

import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Slf4j
@RestService
public class TestRestService {


    /****************************************/
    // http://localhost:8112/services/testRestService/sayHello/xiaming
    @POST
    @Path("/sayHello/{name}")
    @Produces({MediaType.APPLICATION_JSON})
    public String sayHello(@PathParam("name") String name) throws Exception {
        log.error("================方法调用即将返回==================" + name);
        return name;
    }
}
